YES 2.168
H-Termination proof of /home/matraf/haskell/eval_FullyBlown_Fast/List.hs
H-Termination of the given Haskell-Program with start terms could successfully be proven:
↳ HASKELL
↳ LR
mainModule List
| ((elemIndices :: Int -> [Int] -> [Int]) :: Int -> [Int] -> [Int]) |
module List where
| import qualified Maybe import qualified Prelude
|
| elemIndices :: Eq a => a -> [a] -> [Int]
elemIndices | x | = | findIndices (== x) |
|
| findIndices :: (a -> Bool) -> [a] -> [Int]
findIndices | p xs | = | concatMap (\vv1 ->
case | vv1 of |
| (x,i) | -> | if p x then i : [] else [] |
| _ | -> | [] |
) (zip xs (enumFrom 0)) |
|
module Maybe where
| import qualified List import qualified Prelude
|
Lambda Reductions:
The following Lambda expression
\vv1→
case | vv1 of |
| (x,i) | → if p x then i : [] else [] |
| _ | → [] |
is transformed to
findIndices0 | p vv1 | =
case | vv1 of | | (x,i) | → if p x then i : [] else [] |
| _ | → [] |
|
The following Lambda expression
\ab→(a,b)
is transformed to
↳ HASKELL
↳ LR
↳ HASKELL
↳ CR
mainModule List
| ((elemIndices :: Int -> [Int] -> [Int]) :: Int -> [Int] -> [Int]) |
module List where
| import qualified Maybe import qualified Prelude
|
| elemIndices :: Eq a => a -> [a] -> [Int]
elemIndices | x | = | findIndices (== x) |
|
| findIndices :: (a -> Bool) -> [a] -> [Int]
findIndices | p xs | = | concatMap (findIndices0 p) (zip xs (enumFrom 0)) |
|
|
findIndices0 | p vv1 | = |
case | vv1 of |
| (x,i) | -> | if p x then i : [] else [] |
| _ | -> | [] |
|
|
module Maybe where
| import qualified List import qualified Prelude
|
Case Reductions:
The following Case expression
case | vv1 of |
| (x,i) | → if p x then i : [] else [] |
| _ | → [] |
is transformed to
findIndices00 | p (x,i) | = if p x then i : [] else [] |
findIndices00 | p _ | = [] |
↳ HASKELL
↳ LR
↳ HASKELL
↳ CR
↳ HASKELL
↳ IFR
mainModule List
| ((elemIndices :: Int -> [Int] -> [Int]) :: Int -> [Int] -> [Int]) |
module List where
| import qualified Maybe import qualified Prelude
|
| elemIndices :: Eq a => a -> [a] -> [Int]
elemIndices | x | = | findIndices (== x) |
|
| findIndices :: (a -> Bool) -> [a] -> [Int]
findIndices | p xs | = | concatMap (findIndices0 p) (zip xs (enumFrom 0)) |
|
|
findIndices0 | p vv1 | = | findIndices00 p vv1 |
|
|
findIndices00 | p (x,i) | = | if p x then i : [] else [] |
findIndices00 | p _ | = | [] |
|
module Maybe where
| import qualified List import qualified Prelude
|
If Reductions:
The following If expression
if p x then i : [] else []
is transformed to
findIndices000 | i True | = i : [] |
findIndices000 | i False | = [] |
↳ HASKELL
↳ LR
↳ HASKELL
↳ CR
↳ HASKELL
↳ IFR
↳ HASKELL
↳ BR
mainModule List
| ((elemIndices :: Int -> [Int] -> [Int]) :: Int -> [Int] -> [Int]) |
module List where
| import qualified Maybe import qualified Prelude
|
| elemIndices :: Eq a => a -> [a] -> [Int]
elemIndices | x | = | findIndices (== x) |
|
| findIndices :: (a -> Bool) -> [a] -> [Int]
findIndices | p xs | = | concatMap (findIndices0 p) (zip xs (enumFrom 0)) |
|
|
findIndices0 | p vv1 | = | findIndices00 p vv1 |
|
|
findIndices00 | p (x,i) | = | findIndices000 i (p x) |
findIndices00 | p _ | = | [] |
|
|
findIndices000 | i True | = | i : [] |
findIndices000 | i False | = | [] |
|
module Maybe where
| import qualified List import qualified Prelude
|
Replaced joker patterns by fresh variables and removed binding patterns.
↳ HASKELL
↳ LR
↳ HASKELL
↳ CR
↳ HASKELL
↳ IFR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
mainModule List
| ((elemIndices :: Int -> [Int] -> [Int]) :: Int -> [Int] -> [Int]) |
module List where
| import qualified Maybe import qualified Prelude
|
| elemIndices :: Eq a => a -> [a] -> [Int]
elemIndices | x | = | findIndices (== x) |
|
| findIndices :: (a -> Bool) -> [a] -> [Int]
findIndices | p xs | = | concatMap (findIndices0 p) (zip xs (enumFrom 0)) |
|
|
findIndices0 | p vv1 | = | findIndices00 p vv1 |
|
|
findIndices00 | p (x,i) | = | findIndices000 i (p x) |
findIndices00 | p vw | = | [] |
|
|
findIndices000 | i True | = | i : [] |
findIndices000 | i False | = | [] |
|
module Maybe where
| import qualified List import qualified Prelude
|
Cond Reductions:
The following Function with conditions
is transformed to
undefined0 | True | = undefined |
undefined1 | | = undefined0 False |
↳ HASKELL
↳ LR
↳ HASKELL
↳ CR
↳ HASKELL
↳ IFR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ NumRed
mainModule List
| ((elemIndices :: Int -> [Int] -> [Int]) :: Int -> [Int] -> [Int]) |
module List where
| import qualified Maybe import qualified Prelude
|
| elemIndices :: Eq a => a -> [a] -> [Int]
elemIndices | x | = | findIndices (== x) |
|
| findIndices :: (a -> Bool) -> [a] -> [Int]
findIndices | p xs | = | concatMap (findIndices0 p) (zip xs (enumFrom 0)) |
|
|
findIndices0 | p vv1 | = | findIndices00 p vv1 |
|
|
findIndices00 | p (x,i) | = | findIndices000 i (p x) |
findIndices00 | p vw | = | [] |
|
|
findIndices000 | i True | = | i : [] |
findIndices000 | i False | = | [] |
|
module Maybe where
| import qualified List import qualified Prelude
|
Num Reduction: All numbers are transformed to thier corresponding representation with Pos, Neg, Succ and Zero.
↳ HASKELL
↳ LR
↳ HASKELL
↳ CR
↳ HASKELL
↳ IFR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ NumRed
↳ HASKELL
↳ Narrow
mainModule List
| (elemIndices :: Int -> [Int] -> [Int]) |
module List where
| import qualified Maybe import qualified Prelude
|
| elemIndices :: Eq a => a -> [a] -> [Int]
elemIndices | x | = | findIndices (== x) |
|
| findIndices :: (a -> Bool) -> [a] -> [Int]
findIndices | p xs | = | concatMap (findIndices0 p) (zip xs (enumFrom (Pos Zero))) |
|
|
findIndices0 | p vv1 | = | findIndices00 p vv1 |
|
|
findIndices00 | p (x,i) | = | findIndices000 i (p x) |
findIndices00 | p vw | = | [] |
|
|
findIndices000 | i True | = | i : [] |
findIndices000 | i False | = | [] |
|
module Maybe where
| import qualified List import qualified Prelude
|
Haskell To QDPs
↳ HASKELL
↳ LR
↳ HASKELL
↳ CR
↳ HASKELL
↳ IFR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ NumRed
↳ HASKELL
↳ Narrow
↳ AND
↳ QDP
↳ QDPSizeChangeProof
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
Q DP problem:
The TRS P consists of the following rules:
new_foldr0(wy41110, wy41111, wy23, wy22) → new_foldr(wy41111, wy22)
new_foldr(:(wy41110, wy41111), wy19) → new_foldr0(wy41110, wy41111, new_primPlusNat(wy19), new_primPlusNat(wy19))
The TRS R consists of the following rules:
new_primPlusNat(Zero) → Succ(Zero)
new_primPlusNat0(Succ(wy1100)) → Succ(wy1100)
new_primPlusNat(Succ(wy110)) → Succ(Succ(new_primPlusNat0(wy110)))
new_primPlusNat0(Zero) → Zero
The set Q consists of the following terms:
new_primPlusNat0(Succ(x0))
new_primPlusNat(Zero)
new_primPlusNat0(Zero)
new_primPlusNat(Succ(x0))
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem. From the DPs we obtained the following set of size-change graphs:
- new_foldr(:(wy41110, wy41111), wy19) → new_foldr0(wy41110, wy41111, new_primPlusNat(wy19), new_primPlusNat(wy19))
The graph contains the following edges 1 > 1, 1 > 2
- new_foldr0(wy41110, wy41111, wy23, wy22) → new_foldr(wy41111, wy22)
The graph contains the following edges 2 >= 1, 4 >= 2
↳ HASKELL
↳ LR
↳ HASKELL
↳ CR
↳ HASKELL
↳ IFR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ NumRed
↳ HASKELL
↳ Narrow
↳ AND
↳ QDP
↳ QDP
↳ QDPSizeChangeProof
↳ QDP
↳ QDP
↳ QDP
↳ QDP
Q DP problem:
The TRS P consists of the following rules:
new_foldr1(:(wy41110, wy41111), wy18) → new_foldr2(wy41110, wy41111, new_primPlusNat(wy18), new_primPlusNat(wy18))
new_foldr2(wy41110, wy41111, wy21, wy20) → new_foldr1(wy41111, wy20)
The TRS R consists of the following rules:
new_primPlusNat(Zero) → Succ(Zero)
new_primPlusNat0(Succ(wy1100)) → Succ(wy1100)
new_primPlusNat(Succ(wy110)) → Succ(Succ(new_primPlusNat0(wy110)))
new_primPlusNat0(Zero) → Zero
The set Q consists of the following terms:
new_primPlusNat0(Succ(x0))
new_primPlusNat(Zero)
new_primPlusNat0(Zero)
new_primPlusNat(Succ(x0))
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem. From the DPs we obtained the following set of size-change graphs:
- new_foldr2(wy41110, wy41111, wy21, wy20) → new_foldr1(wy41111, wy20)
The graph contains the following edges 2 >= 1, 4 >= 2
- new_foldr1(:(wy41110, wy41111), wy18) → new_foldr2(wy41110, wy41111, new_primPlusNat(wy18), new_primPlusNat(wy18))
The graph contains the following edges 1 > 1, 1 > 2
↳ HASKELL
↳ LR
↳ HASKELL
↳ CR
↳ HASKELL
↳ IFR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ NumRed
↳ HASKELL
↳ Narrow
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDPSizeChangeProof
↳ QDP
↳ QDP
↳ QDP
Q DP problem:
The TRS P consists of the following rules:
new_psPs(wy10, Succ(wy30000), Succ(wy41100000), wy15) → new_psPs(wy10, wy30000, wy41100000, wy15)
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem. From the DPs we obtained the following set of size-change graphs:
- new_psPs(wy10, Succ(wy30000), Succ(wy41100000), wy15) → new_psPs(wy10, wy30000, wy41100000, wy15)
The graph contains the following edges 1 >= 1, 2 > 2, 3 > 3, 4 >= 4
↳ HASKELL
↳ LR
↳ HASKELL
↳ CR
↳ HASKELL
↳ IFR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ NumRed
↳ HASKELL
↳ Narrow
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDPSizeChangeProof
↳ QDP
↳ QDP
Q DP problem:
The TRS P consists of the following rules:
new_foldr4(wy300, Neg(Zero), wy4111, wy8, wy7) → new_foldr3(wy300, wy4111, wy8)
new_foldr4(wy300, Neg(Succ(wy411000)), wy4111, wy8, wy7) → new_foldr3(wy300, wy4111, wy8)
new_foldr3(wy300, :(wy41110, wy41111), wy8) → new_foldr4(wy300, wy41110, wy41111, new_primPlusNat(wy8), new_primPlusNat(wy8))
new_foldr4(wy300, Pos(wy41100), wy4111, wy8, wy7) → new_foldr3(wy300, wy4111, wy8)
The TRS R consists of the following rules:
new_primPlusNat(Zero) → Succ(Zero)
new_primPlusNat0(Succ(wy1100)) → Succ(wy1100)
new_primPlusNat(Succ(wy110)) → Succ(Succ(new_primPlusNat0(wy110)))
new_primPlusNat0(Zero) → Zero
The set Q consists of the following terms:
new_primPlusNat0(Succ(x0))
new_primPlusNat(Zero)
new_primPlusNat0(Zero)
new_primPlusNat(Succ(x0))
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem. From the DPs we obtained the following set of size-change graphs:
- new_foldr3(wy300, :(wy41110, wy41111), wy8) → new_foldr4(wy300, wy41110, wy41111, new_primPlusNat(wy8), new_primPlusNat(wy8))
The graph contains the following edges 1 >= 1, 2 > 2, 2 > 3
- new_foldr4(wy300, Neg(Zero), wy4111, wy8, wy7) → new_foldr3(wy300, wy4111, wy8)
The graph contains the following edges 1 >= 1, 3 >= 2, 4 >= 3
- new_foldr4(wy300, Neg(Succ(wy411000)), wy4111, wy8, wy7) → new_foldr3(wy300, wy4111, wy8)
The graph contains the following edges 1 >= 1, 3 >= 2, 4 >= 3
- new_foldr4(wy300, Pos(wy41100), wy4111, wy8, wy7) → new_foldr3(wy300, wy4111, wy8)
The graph contains the following edges 1 >= 1, 3 >= 2, 4 >= 3
↳ HASKELL
↳ LR
↳ HASKELL
↳ CR
↳ HASKELL
↳ IFR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ NumRed
↳ HASKELL
↳ Narrow
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDPSizeChangeProof
↳ QDP
Q DP problem:
The TRS P consists of the following rules:
new_foldr6(wy300, Neg(wy41100), wy4111, wy10, wy9) → new_foldr5(wy300, wy4111, wy10)
new_foldr6(wy300, Pos(Succ(wy411000)), wy4111, wy10, wy9) → new_foldr5(wy300, wy4111, wy10)
new_foldr6(wy300, Pos(Zero), wy4111, wy10, wy9) → new_foldr5(wy300, wy4111, wy10)
new_foldr5(wy300, :(wy41110, wy41111), wy10) → new_foldr6(wy300, wy41110, wy41111, new_primPlusNat(wy10), new_primPlusNat(wy10))
The TRS R consists of the following rules:
new_primPlusNat(Zero) → Succ(Zero)
new_primPlusNat0(Succ(wy1100)) → Succ(wy1100)
new_primPlusNat(Succ(wy110)) → Succ(Succ(new_primPlusNat0(wy110)))
new_primPlusNat0(Zero) → Zero
The set Q consists of the following terms:
new_primPlusNat0(Succ(x0))
new_primPlusNat(Zero)
new_primPlusNat0(Zero)
new_primPlusNat(Succ(x0))
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem. From the DPs we obtained the following set of size-change graphs:
- new_foldr5(wy300, :(wy41110, wy41111), wy10) → new_foldr6(wy300, wy41110, wy41111, new_primPlusNat(wy10), new_primPlusNat(wy10))
The graph contains the following edges 1 >= 1, 2 > 2, 2 > 3
- new_foldr6(wy300, Neg(wy41100), wy4111, wy10, wy9) → new_foldr5(wy300, wy4111, wy10)
The graph contains the following edges 1 >= 1, 3 >= 2, 4 >= 3
- new_foldr6(wy300, Pos(Succ(wy411000)), wy4111, wy10, wy9) → new_foldr5(wy300, wy4111, wy10)
The graph contains the following edges 1 >= 1, 3 >= 2, 4 >= 3
- new_foldr6(wy300, Pos(Zero), wy4111, wy10, wy9) → new_foldr5(wy300, wy4111, wy10)
The graph contains the following edges 1 >= 1, 3 >= 2, 4 >= 3
↳ HASKELL
↳ LR
↳ HASKELL
↳ CR
↳ HASKELL
↳ IFR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ NumRed
↳ HASKELL
↳ Narrow
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDPSizeChangeProof
Q DP problem:
The TRS P consists of the following rules:
new_psPs0(Succ(wy30000), Succ(wy400000), wy5) → new_psPs0(wy30000, wy400000, wy5)
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem. From the DPs we obtained the following set of size-change graphs:
- new_psPs0(Succ(wy30000), Succ(wy400000), wy5) → new_psPs0(wy30000, wy400000, wy5)
The graph contains the following edges 1 > 1, 2 > 2, 3 >= 3